package com.longway.core.toolbox.wdp.api;

import com.longway.core.toolbox.wdp.WdpConfig;
import com.longway.core.toolbox.wdp.WdpConfigKit;

public class AuthKit {
    private static String url = "https://mp.weixin.qq.com/cgi-bin/componentloginpage?component_appid=%s&pre_auth_code=%s&redirect_uri=%s&auth_type=%s";

    //生成扫码授权页网址
    public static String getAuthPath(String preAuthCode,String redirectUri,String authType) {
    	WdpConfig wdp = WdpConfigKit.getWdpConfig();
        String appId = wdp.getAppId();
        return String.format(url, appId,preAuthCode,redirectUri,authType);
    }

}
